<!-- 热卖推荐，划过换一换 -->
<!-- F1 start -->
<div class="hot_sale" id="F1">
    <div class="hot_sale_title">
        <span></span>
        <h2>热卖推荐</h2>
        <ul class="tabDiv">
            <li class="tab_item tab_selected">
                热销排行<i></i>
                <div class="shugang"></div>
            </li>

            <li class="tab_item">
                新品上市<i></i>
            </li>

            <li class="tab_item">
                高端花艺<i></i>
            </li>
            <li class="tab_item limore">
                更多
            </li>
        </ul>
    </div>

    <!-- 分割 -->

    <div class="tab_content active">
        <ul class="tab_content_selected render1">
            <!-- 这里是渲染的图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul class="tab_content_selected render2">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul class="tab_content_selected render3">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
</div>
<!-- F1 end -->
<!-- F2 start -->
<div class="hot_sale" id="F2">
    <div class="hot_sale_title">
        <span></span>
        <h2>热卖推荐</h2>
        <ul class="tabDiv">
            <li class="tab_item tab_selected">
                热销排行<i>|</i>
            </li>

            <li class="tab_item">
                新品上市<i>|</i>
            </li>

            <li class="tab_item">
                高端花艺<i>|</i>
            </li>
            <li class="tab_item limore">
                更多
            </li>
        </ul>
    </div>

    <!-- 分割 -->

    <div class="tab_content active">
        <ul id="" class="tab_content_selected render1">
            <!-- 这里是渲染的图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul id="" class="tab_content_selected render2">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul id="" class="tab_content_selected render3">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
</div>
<!-- F2 end -->
<!-- F3 START-->
<div class="hot_sale" id="F3">
    <div class="hot_sale_title">
        <span></span>
        <h2>热卖推荐</h2>
        <ul class="tabDiv">
            <li class="tab_item tab_selected">
                热销排行<i>|</i>
            </li>

            <li class="tab_item">
                新品上市<i>|</i>
            </li>

            <li class="tab_item">
                高端花艺<i>|</i>
            </li>
            <li class="tab_item limore">
                更多
            </li>
        </ul>
    </div>

    <!-- 分割 -->

    <div class="tab_content active">
        <ul id="" class="tab_content_selected render1">
            <!-- 这里是渲染的图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul id="" class="tab_content_selected render2">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul id="" class="tab_content_selected render3">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
</div>
<!-- F3 END-->
<!-- F4 START-->
<div class="hot_sale" id="F4">
    <div class="hot_sale_title">
        <span></span>
        <h2>热卖推荐</h2>
        <ul class="tabDiv">
            <li class="tab_item tab_selected">
                热销排行<i>|</i>
            </li>

            <li class="tab_item">
                新品上市<i>|</i>
            </li>

            <li class="tab_item">
                高端花艺<i>|</i>
            </li>
            <li class="tab_item limore">
                更多
            </li>
        </ul>
    </div>

    <!-- 分割 -->

    <div class="tab_content active">
        <ul id="" class="tab_content_selected render1">
            <!-- 这里是渲染的图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul id="" class="tab_content_selected render2">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
    <div id="" class="tab_content">
        <ul class="tab_content_selected render3">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
</div>
<!-- F4 END-->
<!-- F5 START-->
<div class="hot_sale" id="F5">
    <div class="hot_sale_title">
        <span></span>
        <h2>热卖推荐</h2>
        <ul class="tabDiv">
            <li class="tab_item tab_selected">
                热销排行<i>|</i>
            </li>

            <li class="tab_item">
                新品上市<i>|</i>
            </li>

            <li class="tab_item">
                高端花艺<i>|</i>
            </li>
            <li class="tab_item limore">
                更多
            </li>
        </ul>
    </div>

    <!-- 分割 -->

    <div class="tab_content active">
        <ul id="" class="tab_content_selected render1">
            <!-- 这里是渲染的图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul id="" class="tab_content_selected render2">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
    <div id="" class="tab_content">
        <ul class="tab_content_selected render3">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
</div>
<!-- F5 END-->
<!-- F6 START-->
<div class="hot_sale" id="F6">
    <div class="hot_sale_title">
        <span></span>
        <h2>热卖推荐</h2>
        <ul class="tabDiv">
            <li class="tab_item tab_selected">
                热销排行<i>|</i>
            </li>

            <li class="tab_item">
                新品上市<i>|</i>
            </li>

            <li class="tab_item">
                高端花艺<i>|</i>
            </li>
            <li class="tab_item limore">
                更多
            </li>
        </ul>
    </div>

    <!-- 分割 -->

    <div class="tab_content active">
        <ul id="" class="tab_content_selected render1">
            <!-- 这里是渲染的图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul id="" class="tab_content_selected render2">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul class="tab_content_selected render3">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
</div>
<!-- F6 END-->
<!-- F7 START-->
<div class="hot_sale" id="F7">
    <div class="hot_sale_title">
        <span></span>
        <h2>热卖推荐</h2>
        <ul class="tabDiv">
            <li class="tab_item tab_selected">
                热销排行<i>|</i>
            </li>

            <li class="tab_item">
                新品上市<i>|</i>
            </li>

            <li class="tab_item">
                高端花艺<i>|</i>
            </li>
            <li class="tab_item limore">
                更多
            </li>
        </ul>
    </div>

    <!-- 分割 -->

    <div class="tab_content active">
        <ul id="" class="tab_content_selected render1">
            <!-- 这里是渲染的图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul id="" class="tab_content_selected render2">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
    <div class="tab_content">
        <ul id="" class="tab_content_selected render3">
            <!-- 这里是渲染的大图 -->
        </ul>
    </div>
</div>
<!-- F7 END-->
<script src="./javascripts/jQuery.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.js"></script>
<script>
    $(function () {
        $.ajax({
                url: "./data.json"
            })
            .then(function (res) {
                render(res.datas);
                $(".lazy").lazyload();
            });
        function render(list) {
            $(".render1").append(
                list.map((item) =>
                    
                    `<a href="http://127.0.0.1:5500/dist/detail.html">
                        <li class="tab_ec_first">
                            <div class="tab_ec_img">
                                    <img class="lazy" data-original="${item.image}" alt="">
                                <div class="tab_ec_num">${item.text_f}<br>
                                    <span style="color: red;">
                                        ${item.text_s}
                                    </span>
                                </div>
                                <div class="tab_ec_qian">${item.money}</div>
                            </div>
                            <div class="mo"></div>
                        </li>
                    </a>`
                ).join("")
                
            )
            $(".render2").append(
                list.map((item) =>
                    
                    `<a href="http://127.0.0.1:5500/dist/detail.html">
                        <li class="tab_ec_first">
                        <div class="tab_ec_img">
                            
                                <img class="lazy" data-original="${list[0].image}" alt="">
                            
                            <div class="tab_ec_num">${item.text_f}<br>
                                <span style="color: red;">
                                    ${item.text_s}
                                </span>
                            </div>
                            <div class="tab_ec_qian">${item.money}</div>
                        </div>
                        <div class="mo"></div>
                    </li>
                </a>`
                ).join("")
            )
            $(".render3").append(
                list.map((item) =>
                    
                    ` <a href="http://127.0.0.1:5500/dist/detail.html">
                    <li class="tab_ec_first">
                        <div class="tab_ec_img">
                           
                                <img class="lazy" data-original="${list[1].image}" alt="">
                            
                            <div class="tab_ec_num">${item.text_f}<br>
                                <span style="color: red;">
                                    ${item.text_s}
                                </span>
                            </div>
                            <div class="tab_ec_qian">${item.money}</div>
                        </div>
                        <div class="mo"></div>
                    </li>
                </a>`
                ).join("")
            )
        };
    });

    // tab切换

    for (let i = 0; i < $("#F1 .tab_item").length - 1; i++) {
        $("#F1 .tab_item").eq(i).on("mouseover", function () {
            console.log(i)
            $("#F1 .tab_content").removeClass("active")
            this.addClass = "tab_selected";
            $("#F1 .tab_content").eq(i).toggleClass("active")
        })
    }
    for (let i = 0; i < $("#F2 .tab_item").length - 1; i++) {
        $("#F2 .tab_item").eq(i).on("mouseover", function () {
            console.log(i)
            $("#F2 .tab_content").removeClass("active")
            this.addClass = "tab_selected";
            $("#F2 .tab_content").eq(i).addClass("active")
        })
    }
    for (let i = 0; i < $("#F3 .tab_item").length - 1; i++) {
        $("#F3 .tab_item").eq(i).on("mouseover", function () {
            console.log(i)
            $("#F3 .tab_content").removeClass("active")
            this.addClass = "tab_selected";
            $("#F3 .tab_content").eq(i).addClass("active")
        })
    }
    for (let i = 0; i < $("#F4 .tab_item").length - 1; i++) {
        $("#F4 .tab_item").eq(i).on("mouseover", function () {
            console.log(i)
            $("#F4 .tab_content").removeClass("active")
            this.addClass = "tab_selected";
            $("#F4 .tab_content").eq(i).addClass("active")
        })
    }
    for (let i = 0; i < $("#F5 .tab_item").length - 1; i++) {
        $("#F5 .tab_item").eq(i).on("mouseover", function () {
            console.log(i)
            $("#F5 .tab_content").removeClass("active")
            this.addClass = "tab_selected";
            $("#F5 .tab_content").eq(i).addClass("active")
        })
    }
    for (let i = 0; i < $("#F6 .tab_item").length - 1; i++) {
        $("#F6 .tab_item").eq(i).on("mouseover", function () {
            console.log(i)
            $("#F6 .tab_content").removeClass("active")
            this.addClass = "tab_selected";
            $("#F6 .tab_content").eq(i).addClass("active")
        })
    }
    for (let i = 0; i < $("#F7 .tab_item").length - 1; i++) {
        $("#F7 .tab_item").eq(i).on("mouseover", function () {
            console.log(i)
            $("#F7 .tab_content").removeClass("active")
            this.addClass = "tab_selected";
            $("#F7 .tab_content").eq(i).addClass("active")
        })
    }
    for (let i = 0; i < $("#F8 .tab_item").length - 1; i++) {
        $("#F8 .tab_item").eq(i).on("mouseover", function () {
            console.log(i)
            $("#F8 .tab_content").removeClass("active")
            this.addClass = "tab_selected";
            $("#F8 .tab_content").eq(i).addClass("active")
        })
    }
</script>